const figure = (Width,Height,num) => {
  var col=[];
  for(var i=0;i<num;i++){
    for (var j = 0; j < num; j++) {
      var left = 0;
      var top = 0;
      var p = Width / 630;
      left = -1*(Width/p) * (j / num);
      top = -1*(Height/p) * (i / num);
      
      var WidthBox = (Width/p)/ num - num*2;     
      var HeightBox = (Height/p)/ num - num * 2;
      console.log("测试数据");
      console.log(WidthBox)
      console.log(HeightBox)
      var objectNum = { id: num * i + j, 
  
      picPosi: "width:" + Width/p + "rpx;position:absolute;left:" + left + "rpx;top:" + top + "rpx",
      BoxPosi: "width:" + WidthBox + "rpx;height:" + HeightBox +"rpx;border:1rpx solid #fff;"
      }
      col.push(objectNum)
    }
  }
  
  return col;
}

// const formatNumber = n => {
//   n = n.toString()
//   return n[1] ? n : '0' + n
// }

module.exports = {
  figure: figure
}